import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter_app/BaseMaterialWidget.dart';
import 'package:flutter_app/page_ten/Product.dart';

class RouteDetail extends BaseMaterialWidget {
  Product product;

  @override
  Widget buildContent(BuildContext context) {
    return Center(
      child: Column(
        children: <Widget>[
          RaisedButton(
            child: Text('返回'),
            onPressed: () {
              //返回
              Navigator.pop(context, product.desc);
            },
          ),
          Text('商品名：${product.name}'),
          Text('描述：${product.desc}')
        ],
      ),
    );
  }

  @override
  String getTitle() {
    return '详情页';
  }

  RouteDetail(this.product);
}
